<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui">

<!-- INTERFACE -->
<composite:interface displayName="Eliminar/Anular">
	<composite:attribute required="true" name="bean" />
	]<composite:attribute required="false" name="id" default="panelAnular" />
	<composite:attribute required="false" name="titulo" default="Eliminar/Anular" />
</composite:interface>

<!-- IMPLEMENTATION -->
<composite:implementation>

	<p:commandButton title="#{cc.attrs.titulo}" icon="ui-icon-trash" oncomplete="#{cc.attrs.id}.show()" process="@this"
		rendered="#{!cc.attrs.bean.editado}">
	</p:commandButton>

	<p:confirmDialog id="#{cc.attrs.id}" header="#{cc.attrs.titulo}" widgetVar="#{cc.attrs.id}" height="80" width="300" appendTo="@(body)"
		message="Esta seguro de Eliminar/Anular el registro">

		<center>

			<p:commandButton value="SI" action="#{cc.attrs.bean.eliminar}" process="@this, :form:panelContenedor"
				update="@this, :form:panelContenedor" partialSubmit="true" onclick="#{cc.attrs.id}.hide()">
			</p:commandButton>

			<p:commandButton process="@this" value="NO" partialSubmit="true" onclick="#{cc.attrs.id}.hide()" />

		</center>

	</p:confirmDialog>

</composite:implementation>
</html>
